finding the derivative of inverse functions